package com.teaching.teachingsupport.common.enums;

import lombok.Getter;

@Getter
public enum NotificationScopeTypeEnum {
    SCHOOL(1, "全校"),
    COLLEGE(2, "学院"),
    MAJOR(3, "专业"),
    CLASS(4, "班级");

    private final Integer code;
    private final String desc;

    NotificationScopeTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static NotificationScopeTypeEnum getByCode(Integer code) {
        for (NotificationScopeTypeEnum type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }
} 